public class text {
    public static String toLowerCase(String s) {
        return s.toLowerCase();
    }

    public static void main(String[] args) {
        System.out.println(toLowerCase("HeLlo0"));
    }
    public String toLowerCase2(String s) {
        if(s == null || s.length() == 0) {
            return null;
        }
        StringBuilder sb = new StringBuilder();
        for(int i = 0;i < s.length();i++) {
            char ch = s.charAt(i);
            //大写字母进行转换
            if(ch >= 'A' && ch <= 'Z') {
                sb.append((char)(ch+32));
            }else{
                //小写字母直接拼接
                sb.append(ch);
            }
        }
        return sb.toString();
}
